class MensaController < ApplicationController
  def index
    date = begin
             Date.strptime(params[:date], '%Y-%U')
           rescue
             Date.today
           end

    respond_to do |format|
      format.json { render json: MensaLoader.new(date).dishes.to_json }
    end
  end
end
